﻿using System.Collections.Generic;
using Needle.Bus.Messages;

namespace Needle.Bus.Engine
{
    /// <summary>
    /// A limited capacity buffer queue.
    /// </summary>
    public interface IBufferQueue : ISource, ISink , IHasCount, IEngineComponent
    {
        /// <summary>
        /// Gets or sets the capacity.
        /// </summary>
        int Capacity { get; set; }
        /// <summary>
        /// clears the messages from the queue unconditionally, and returns the removed messages.
        /// </summary>
        IList<IMessage> Purge();
        
    }

}
